/*
${' '}* Copyright ${.now?string('yyyy')} The JA-SIG Collaborative. All rights reserved.
${' '}* distributed with this file and available online at
${' '}*/
package ${basePackage}.domain.${module};<#lt>

import com.lap.framework.ddd.AggregateRoot;
import lombok.Getter;

import java.time.LocalDateTime;

/**
${' '}* ${(tableComment)!''}领域。
${' '}*
${' '}* @author  ${author!'generator'}
${' '}* @version ${version!'1.0.0'}
${' '}*/
@Getter
public class ${className} extends AggregateRoot {
<#if fields??>
    <#list fields as field>
    <#if field.ignoreEntity == false>

    ${'  '}/** ${field.comment!''} */<#lt>
    ${'  '}private final ${(field.javaType)!''} ${field.fieldName!''};<#lt>
    </#if>
    </#list>

    ${'  '}public ${className}(<#t>
    <#list fields as field>
        <#if field.ignoreEntity == false>
            <#if (field_index)!=0>, </#if><#if (field_index+1)%3==0>${'\n\t'}</#if>${field.javaType} ${field.fieldName}<#t>
        </#if>
    </#list>
    ) {<#lt>
    <#list fields as field>
        <#if field.ignoreEntity == false>
        ${'    '}this.${field.fieldName} = ${field.fieldName};<#lt>
        </#if>
    </#list>
    ${'  '}}<#lt>
</#if>

${'  '}public boolean isNew() {<#rt>${'\n'}
${'    '}return (id == null);<#rt>${'\n'}
${'  '}}<#rt>${'\n'}
}